package com.itlong.cloud.POJO.DTO.property;

import com.itlong.cloud.enumerate.AppUserRoomStatusEnum;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <desc>
 *      App用户详情页中入住历史数据传输对象
 * </desc>
 *
 * @createDate 2017-12-25
 */
@Data
@NoArgsConstructor
public class AppUserStayInHistoryDTO implements Serializable{
    private String phoneNum;    //用户手机号

    private String projectName;     //项目名称
    private String projectId;       //项目Id
    private String buildName;       //楼栋名称
    private String buildId;         //楼栋Id
    private String unitName;        //单元名称
    private String unitId;          //单元Id
    private String roomId;      //房间Id
    private String roomNum;         //房间号

    private Integer operType;       //入住历史操作类型：2迁入 3迁出
    private String operTypeName;    //入住历史操作类型名：2迁入 3迁出

    private String createTime;            //创建时间

    public String getOperTypeName() {
        if (operType != null) {
            return AppUserRoomStatusEnum.getDescription(operType);
        } else {
            return operTypeName;
        }
    }
}
